<html>
<head>
<script>
    document.writeln("<script>\nfunction f1() {\n  window.foo = true;\n}\nf1();\n <" + "/script>");
</script>

<script>
    console.assert(window.foo, "FAIL");
</script>
</head>
</html>
